SGI IRIX INTERFACE To start the X Window interface to Interchange
for SGI IRIX, enter 'icx'. If the installation directory
is not on your current path for searching for programs,
you can specify the full path or add the Interchange
directory to your path. If you are familiar with the
interface of Interchange for Microsoft Windows, the X
Window Motif interface should be quite familiar.
For more information about the 'icx'
user interface, see the descriptions of Interchange for
Windows. The user interface is almost the same.
Command line interface
Interchange for SGI IRIX also includes an alternative
interface called 'iccli' that does not use the X Window
Motif graphical user interface of the 'icx' program. This
interface is not present in the Microsoft Windows version
of Interchange.
This command-line interface can be used
to quickly convert files if you are accustomed to the
Unix shell or prefer to carry out conversions using shell
scripts.
Depending on the types of conversions
you need, you may choose the graphical interface or the
command line interface. The command line interface can be
used within your own shell scripts, making it possible to
automate more complex conversions than the single batch
conversions of the graphical interface.
The 'iccli' interface allows both batch
and simple single conversions.
Simple conversion
This command converts a single 3D Studio file to
stereolithography format:
iccli chevy.3ds "stereolithography asc"
Interchange will examine the contents
of the source file "chevy.3ds" and attempt to
automatically determine its file format. There is no need
to tell Interchange what type of data is stored there.
The second (or in general, last)
argument sets the export format. In this example, the
"stereolithography asc" format chooses the
ASCII version of that file format. This string can be any
unambigious sub-string from the list of file formats
available for export from Interchange.
For a definitive list of the acceptable
file formats, enter just 'iccli' to see the usage. For
some formats, the description can be very short, such as
"byu". In other cases, the unabiguous
description is longer, and needs to be enclosed in quotes
if the description includes spaces.
During a command-line conversion,
Interchange's status messages go to 'stderr' and can be
redirected to a file with ">&".
Batch conversion
This command converts many 3D Studio files to Wavefront
format:
iccli *.3ds "wavefront object"
Your command shell expands the
"*.3ds" to the filenames of all the files
ending in ".3ds" in the current directory. For
example, if the current directory only contained three
files, you could also enter:
iccli chevy.3ds ford.3ds volvo.3ds "wavefront object"
If there were no "*.3ds"
files in the current directory, the error message is:
iccli: No match.
Dialog for conversion options
Even with the command line interface, you can invoke the
options dialog for either the importing or the exporting
Converter. This command converts many 3D Studio files to
Wavefront format:
iccli chevy.3ds -d "wavefront object"
The "-d" option follows the
file specification of the Converter you want to invoke.
In the example above, the "-d" follows
"chevy.3ds", so the 3D Studio Converter's
dialog will open before this file is imported. You can
adjust the Converter's options. When you close this
option dialog, the conversion continues. To invoke the
Wavefront Converter's dialog, you'd enter the
"-d" at the end of the above command line.
Command line conversion options
All Interchange Converters have option dialogs. These
dialogs present a user interface to settings that control
the way files are imported or exported in that format.
For more information about options files, see the
following chapter. These option settings are persistent
between sessions. The next time you run Interchange, the
values will be the same as your last session.
You can adjust the conversion options
from the command line. This method is arcane and
inconvenient for most casual use, but it is a feature for
people writing scripts to drive complicated conversions.
It uses the key-value pairs found in
each Converter's "INI" file. For example, to
turn on "lone edges" and turn off
"lonepoints" in the Wavefront Converter, you
can enter:
iccli *.3ds "wavefront object" -doLoneEdges=0 -doLonePts=1
Changing settings on an option dialog
makes permanent changes in the options file, as described
in a section below.
Recognizing files
The command line interface also offers a convenient
method of identifying the types of files, similar to the
Unix 'file' command.
This command will display the type of every file in the
current directory, as recognized by Interchange:
iccli -g *
Options files
In Interchange for SGI IRIX, the settings in the Options
dialogs for Interchange and its Converters are stored in
files ending in ".INI". These files are stored
in a directory called '.Interchange' (dot Interchange) in
the user's home directory. This allows each user of
Interchange to maintain their own settings.
Alternatively, the environment variable
'IC_HOME' is used to specify a directory where the option
files will be kept. If for some reason the '.Interchange'
or 'IC_HOME' directories cannot be used, the option files
will be created in the directory where the Interchange
executable itself is located.
Within the option files, options are in
the form of "key" and "value" pairs,
separated by an equal character, where the key is a
keyword such as "doLoneEdges" similar to the
descriptive text found on the Options dialog, and value
is a numeric or string value reflecting the setting.
Simple "on" and "off" values are
represented with '0' and '1', respectively.
For example, here is the contents of
the default "WAVE.INI" file for the Wavefront
Converter, showing the keyword and value pairs.
[Preferences]
doLonePts=0
doLoneEdges=0
doOrigFaces=1
doOppFaces=0
doMatLib=0
doShortMats=1
doRewind=1
EndingState=1
|